<?php

namespace App\Http\Resources\Frontend;

use Illuminate\Http\Resources\Json\JsonResource;

class ApiResource extends JsonResource
{

    public function __construct($message = 'OK', $code = 200, $data = [])
    {
        parent::__construct(compact('code', 'message', 'data'));
    }

    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return parent::toArray($request);
    }
}
